const { createContract1 } = require("./01.班课录入.js")
const { audit } = require("./02.合同审核.js")
const { receipt } = require("./03.财务收款.js")
const { agree } = require("./04.接档.js")

const studentId = 107

async function main (){
    const data = await createContract1(studentId)
    if(data.code === "0") {
        const autos = [audit,receipt,agree]
        const contractId = data.data.contractId
        for(cb of autos) {
            await cb(contractId)
        }
    }
}

// async function main (){
//     const autos = [audit,receipt,agree]
//     const contractId = 59
//     for(cb of autos) {
//         const data = await cb(contractId)
//         console.log(data)
//     }
// }

main()